/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.stream.IntStream;
import java.util.stream.Stream;

/**
 * <p>Project: javase - Stream5
 * <p>Powered by webrx On 2021-12-22 17:54:11
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Stream6 {
    public static void main(String[] args) {
        var ss = Stream.of(new Student(1, "jack", 28, "男"), new Student(2, "james", 58, "女"));
        //ss.peek(o -> o.setAge(o.getAge() + 5)).forEach(System.out::println);
        ss.map(o -> {
            o.setAge(o.getAge() + 5);
            return o;
        }).forEach(System.out::println);

    }
}
